package com.ddwl.schema.bo.user;

import com.ddwl.schema.bo.base.BaseBo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * @author Fu Zhaohui
 * @version 1.0.0
 * @date 2019/4/30 14:48
 */
@ApiModel(description = "登录Bo")
@Setter
@Getter
public class LoginBo extends BaseBo {

    @ApiModelProperty("类型 0 短信验证码登录，2 账号密码登录,1 微信登录")
    private String type;

    @ApiModelProperty("手机号码")
    @Pattern(regexp = "^1\\d{10}$", message = "手机号码格式错误")
    private String mobile;

    @ApiModelProperty("手机号码")
    private String username;

    @ApiModelProperty("登录密码")
    @Length(min = 6, message = "密码长度至少6位")
    //@NotNull(message = "登录密码为空")
    private String password;

    @ApiModelProperty("登录验证码UUID")
    private String uuid;

    @ApiModelProperty("登录验证码")
    private String code;

    @ApiModelProperty(value = "浏览器信息", hidden = true)
    private String userAgent;

    @ApiModelProperty(value = "用户ID", hidden = true)
    private String id;
    @ApiModelProperty(value = "昵称", hidden = true)
    private String nickname;
    @ApiModelProperty(value = "真实姓名", hidden = true)
    private String realname;
    @ApiModelProperty(value ="渠道" , hidden = true)
    private String channel;
    @ApiModelProperty(value ="店铺ID" , hidden = true)
    private String shopId;
    @ApiModelProperty(value ="店铺名称" , hidden = true)
    private String shopName;
    @ApiModelProperty("登录来源 0：app 1：五八马小程序")
    private String loginSource;
}
